package com.soshalboard.remote.exceptions;

/*
 * extends RuntimeException, to throw Remote Exception if something goes wrong.
 */
public class RemoteException extends RuntimeException {

	private static final long serialVersionUID = -3000991444949748723L;
	private int code;
	private String message;

	public RemoteException(String errorMessage, int code) {
		super(errorMessage);
		this.code = code;
		this.message = errorMessage;
	}

	public RemoteException(int code, String errorMessage, Exception e) {
		super(errorMessage, e);
		this.code = code;
		this.message = errorMessage;
	}

	public RemoteException(String errorMessage) {
		super(errorMessage);
		this.message = errorMessage;

	}

	public int getCode() {
		return code;
	}

	@Override
	public String getMessage() {
		return message;
	}
}
